#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010, Fabian Greif
# Copyright (c) 2012, Sascha Schade
# Copyright (c) 2016, Daniel Krebs
#
# This file is part of the modm project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# -----------------------------------------------------------------------------

import os

env = Environment(tools=['javac', 'jar'], ENV = os.environ)
env.Append(JAVACFLAGS = '-encoding utf-8 -Xlint:deprecation -Xlint:unchecked')

classes = env.Java('classes', 'source')
jar = env.Jar(target = 'font_creator.jar', source = [classes, 'manifest.txt'])

env.Alias('build', classes)
env.Alias('jar', jar)
env.Alias('all', ['build', 'jar'])
env.Alias('run', env.Command(None, jar, '@java -jar $SOURCE'))

env.Default('all')
